package com.jic.member.constant.enums;

/**
 * @author yinhaijun
 * @date: 2020/6/6
 */
public enum NodeTemplateTypeEnum {
    LABEL_SELECTION_NODE("label_selection_node","标签选择"),
    USER_GROUP_SELECTION_NODE("user_group_selection_node","用户组选择"),
    EVENT_SELECTION_NODE("event_selection_node","事件选择"),
    TIMED_TRIGGER_NODE("timed_trigger_node","定时触发"),
    WAIT_NODE("wait_node","等待"),
    EVENT_JUDGE_NODE("event_judge_node","事件判断"),
    SEND_COUPON_NODE("send_coupon_node","发放优惠券"),
    SEND_RED_ENVELOPE_NODE("send_red_envelope_node","发放红包"),
    SEND_MARKET_NODE("send_market_node","推送促销活动"),
    SEND_GOODS_NODE("send_goods_node","推送商品信息"),
    SEND_GRAPHIC_NODE("send_graphic_node","推送图文"),
    SEND_SMS_NODE("send_sms_node","发短信"),
    SEND_WECHAT_NODE("send_wechat_node","发微信消息"),
    SEND_MAIL_NODE("send_mail_node","发邮件"),
    SEND_APPPUSH_NODE("send_apppush_node","发Apppush消息"),
    START_NODE("start_node","开始"),
    END_NODE("end_node","结束"),
    ;

    private String code;

    private String message;

    NodeTemplateTypeEnum(String code, String message){
        this.code = code;
        this.message = message;
    }

    public static NodeTemplateTypeEnum getByCode(String code){
        NodeTemplateTypeEnum[] values = NodeTemplateTypeEnum.values();
        for(NodeTemplateTypeEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
